<div class="large-12 colums">
  <table>
  <thead>
    <tr>
      <th>Адреса</th> 
      <th width="100">Кімнат</th>
      <th width="100">Площа</th>
      <th width="125">Ціна</th>
      <th width="100">Деталі</th>
    </tr>
  </thead>
    <tbody>
        <tr>         
<?php $apartments = ORM::factory('apartment')
            ->where('user_id', '=', Cookie::get('id'))
            ->find_all();
        if($apartments->count()>0)
        {
            foreach($apartments as $apartment)
            {     
                echo '<td>'.$apartment->city->region->name.', м.'.$apartment->city->name.', вул.'.$apartment->street .','.$apartment->house.'/'.$apartment->number.'</td>';
                echo '<td>'.$apartment->numberRoom .'</td>';
                echo '<td>'.$apartment->area .'</td>';
                echo '<td>'.$apartment->price .'</td>';
                echo '<td> <form  method="post">    <button class="button tiny small secondary" type="submit" name="det" >Деталі</button> </td>';
                echo '<input type="hidden" name="idap" value="'.$apartment->id.'">';
                echo '</form></tr>'; 
                echo '</tr>';
            }            
        }
        else
        {
            echo "У вас не має жодного запису";
        }
?>       
</tbody>
    </table>
</div>
<script src="js/vendor/jquery.js"></script>
  <script src="js/foundation/foundation.js"></script>
  <script src="js/foundation/foundation.reveal.js"></script>
  <!-- Other JS plugins can be included here -->
  <script>
    $(document).foundation();
  </script>